prompt = 'Please enter your age: '
while True:
    age = int(input(prompt))
    if age < 3:
        print('The ticket is free.')
    elif age < 12:
        print('The ticket costs 10 dollars.')
    else:
        print('The ticket costs 15 dollars.')

